Python and C++ are coming

Kinja'd!!! "Wheelerguy" (wheelerguy)
06/14/2018 at 03:45 • Filed to: computerlopnik, programming, Gamelopnik

Kinja'd!!!2 Kinja'd!!! 7
Kinja'd!!! Kinja'd!!!

Come 25 June I’m taking a new course in 3D Animation! Woo! But before I even start there, I have to learn how to code. As Blender and Unreal 4 run on Python and C++ respectively, !!!error: Indecipherable SUB-paragraph formatting!!! , !!!error: Indecipherable SUB-paragraph formatting!!! . What should I expect from these two?


DISCUSSION (7)


Kinja'd!!! tpw_rules > Wheelerguy
06/14/2018 at 04:24

Kinja'd!!!8

Ok I absolutely love Python. It’s my favorite programming language. My first bit of advice is despite what certain people tell you, learn Python 3. Python 2 is dying. My second bit of advice is to find some small thing you want to make and then try and make it. Something like “use Blender” might be a bit too broad a goal, especially because that’s not so much learning Python as learning how Blender uses Python. A normal Blender user doesn’t use Python, only if they want to script it. If you can’t think of anything, computerized card games are fun. But having a goal you want to accomplish is very important.

Regarding C++: may I humbly suggest you learn Python first? It can teach you about how programming works, without having to deal with obnoxious details right up front. Full disclosure though: I don’t like C++.

Edit: A dirty secret of programming that I don’t think a lot of people realize is that the act of typing code is not programming. It’s simply transcribing your ideas into whatever language you are using. And honestly, that’s not an especially hard task, no matter what language you are using. “Programming” is learning to structure your ideas in a way that’s easy to transcribe. It’s knowing about data structures, the capabilities of the computer, efficient algorithms, how to find libraries that already do what you want. It’s how to take an arbitrary problem description and see what blocks are needed to build it. If you master that, writing it down isn’t hard. That’s why I like having a goal: it teaches you to think of your problems as a programmer would, instead of just learning the magic words which make the computer solve your problem.


Kinja'd!!! Future Heap Owner > Wheelerguy
06/14/2018 at 04:54

Kinja'd!!!3

Focus on Python. Python is a great language for a beginner. It’s simple, fairly high-level, and has tons and tons of resources available. You can do a lot of cool stuff really easily. The best way to learn it is to pick some small, useful or fun task to write a program to test with, and have at it. Good examples are finding a drawing library and making some programmatic art, pulling down a public web page and extracting some bit of information from it (a lot harder now that so many sites rely heavily on JavaScript), or making an interactive CLI number guessing game.

Don’t worry too much about the Python 2/3 split, the differences are fairly minor so you can adapt to whichever one your course uses. Although honestly I’d be surprised if the course requires much of either. You don’t need to know how the tools are built in order to become good users of the tools, only if you want to change the tools themselves. Is this your first 3D Animation course, or an advanced one that focuses on interactive behavior?

I wouldn’t worry at all about C++ for many many years, if ever. Unreal has a scripting language that’s used by most of the people who code things with Unreal. C++ forces you to confront many of the hard truths about how computers work (mainly with regards to memory and how values are represented in the CPU), everything you do is at least 10x harder, and you shouldn’t try it without a CS/SE education or many years of self-study. It’s the language that’s used by far less people than Python to make things that run on far more computers than the average Python program, because it’s used when absolute efficiency of the code is the most important thing. Also it’s misguided. Avoid it like the plague.


Kinja'd!!! TheRealBicycleBuck > Wheelerguy
06/14/2018 at 07:07

Kinja'd!!!1

I highly recommend Udemy courses for learning Python. Jose Portilla is an excellent instructor and has a crash course on Python basics and a number of advanced courses available. It’s hard to beat it for $10.

My son is currently working his way through the intro course to keep him busy over the summer.


Kinja'd!!! BJ > Wheelerguy
06/14/2018 at 07:56

Kinja'd!!!1

I haven’t written any C/C++ code in a decade, but it is enormously powerful and, with the right libraries, quick to develop with. Watch out for memory use - you need to release any memory you reserve. In a Blender/3d animation context, this might be different, or you’ll have specific calls for these tasks that make it easier (auto pointers, etc).

Python is interesting, but I’ve not used it a lot. I find the dependence on formatting to define scope a bit difficult to master, it forces you to set aside a lot of the personal style that you have created over time. At the same time, it’s somewhat less ambiguous because lazy devs who don’t indent properly won’t get very far.

As tpw_rules mentioned, just “writing” code isn’t programming. Programming is about structure and the communication of ideas (data), the logic behind building a process that achieves a goal. Just like architecture is about organising all the parts of a building - you could just throw a bunch of sticks in a pile and call it a house, but it won’t do the job as well as a set of walls and a roof that are planned out and properly assembled in the right order.

Good luck and have fun!


Kinja'd!!! BaconSandwich is tasty. > Wheelerguy
06/14/2018 at 08:31

Kinja'd!!!0

If you need a hand with Python, let me know. I use it at work.


Kinja'd!!! Lumpy44, Proprietor Of Fine Gif > tpw_rules
06/14/2018 at 09:16

Kinja'd!!!0

This is good, very good.


Kinja'd!!! Nauraushaun > Wheelerguy
06/16/2018 at 11:40

Kinja'd!!!0

Start with python. C++ is a beast. You’ll get bogged down in pointer errors and ultimately learn slower.